#!/usr/bin/env sh

set -o errexit
set -o nounset
set -o pipefail

SHA="$(git rev-parse --short HEAD),latest"

# If tag, use tag
TAG=$( (git describe --exact-match 2> /dev/null || echo "") | sed 's/v//g')
if [ -z "$TAG" ]
then
      echo ${SHA}
else
      echo ${TAG}
fi
